﻿using Microsoft.AspNetCore.Builder;

namespace SCM.Manage.Middleware
{
    /// <summary>
    /// 中间件帮助类
    /// </summary>
    public static class MiddlewareHelper
    {
        /// <summary>
        /// 异常中间件
        /// </summary>
        /// <param name="builder"></param>
        /// <returns></returns>
        public static IApplicationBuilder UseExceptionMiddleware(this IApplicationBuilder builder)
        {
            return builder.UseMiddleware<ExceptionMiddleware>();
        }
    }
}
